<template>
	<view>
		<view class="card" v-if="item">
		<view class="topRow1" @click="gotoDetailFun">
			<view class="name">
				<text>{{item.into_no || '暂无'}}</text>
			</view>
			<view>
				<text class="colorGray">业务类型：</text>
				<text>{{item.bus_info.type || '暂无'}}</text>
			</view>
			<view>
				<text class="colorGray">业务单据：</text>
				<text>{{item.bus_info.name || '暂无'}}</text>
			</view>
			<view>
				<text class="colorGray">入库仓库：</text>
				<text>{{item.store_name || '暂无'}}</text>
			</view>
			<view>
				<text class="colorGray">入库数量：</text>
				<text>{{item.number || '0'}}</text>
			</view>
		</view>
			<view v-if="!isDetail" class="bottomRow">
				<view class="lxRow">
					<text>{{item.status_arr.name || '待入库'}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item: {
				type: Object,
				default: () => {}
			},
			isDetail: {
				type: Boolean,
				default: false
			},
			index: {
				type: Number,
				default: 0
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			//跳转到入库单详情页面
			gotoDetailFun: function() {
				if (this.isDetail) {
					return
				}
				uni.$stockIntoInfo = this.item;
				uni.navigateTo({
					url: '/pages/crm/stock_into/detail?index=' + this.index
				})
			}
		}
	}
</script>

<style>
	.card {
		width: 698rpx;
		padding: 26rpx 26rpx 10rpx;
		margin: 32rpx 26rpx;
		box-sizing: border-box;
		border-radius: 16rpx;
		box-shadow: #d8d8d8 0px 0px 16rpx;
		position: relative;
		background-color: #FFFFFF;
	}

	.topRow1 {
		margin-bottom: 16rpx;
		font-size: 15px;
		color: #000;
		position: relative;
	}

	.name {
		font-size: 16px;
		margin-bottom: 8rpx;
		color: #000000;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		font-weight: bold;
	}

	.bottomRow {
		width: 100%;
		padding-top: 16rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-top: 1rpx solid #f0f0f0;
		font-size: 15px;
		color: #007AFF;
	}

	.lxRow {
		display: flex;
		align-items: center;
	}

	.colorGray {
		color: #888888;
	}
</style>